add_library(pico-ads1115 INTERFACE)

target_include_directories(pico-ads1115
  INTERFACE
  ${CMAKE_CURRENT_LIST_DIR}/include
)

target_link_libraries(pico-ads1115
  INTERFACE
  hardware_i2c
)

#  递归收集所有C源文件
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.c)

file(GLOB_RECURSE INCLUDE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h)

target_sources(pico-ads1115
  INTERFACE
  ${SOURCES}
  ${INCLUDE_SOURCES}
)